<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>atestcasefordoxy: GLShaderManager.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">atestcasefordoxy
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">GLShaderManager.h</div>  </div>
</div>
<div class="contents">
<a href="_g_l_shader_manager_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef GL_SHADER_MANAGER_H</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define GL_SHADER_MANAGER_H</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &quot;<a class="code" href="ogl_headers_8h.html">oglHeaders.h</a>&quot;</span>
<a name="l00005"></a>00005 
<a name="l00006"></a>00006 <span class="preprocessor">#include&lt;vector&gt;</span>
<a name="l00007"></a>00007 <span class="preprocessor">#include&lt;string&gt;</span>
<a name="l00008"></a>00008 
<a name="l00009"></a><a class="code" href="_g_l_shader_manager_8h.html#aa356ed6eff83a083cec318b3f4c5ec26">00009</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="_g_l_shader_manager_8h.html#aa356ed6eff83a083cec318b3f4c5ec26">InstanceAttribType_s</a>{
<a name="l00010"></a><a class="code" href="_g_l_shader_manager_8h.html#aa356ed6eff83a083cec318b3f4c5ec26a1c2da6594681799829eb001299f50133">00010</a>    <a class="code" href="_g_l_shader_manager_8h.html#aa356ed6eff83a083cec318b3f4c5ec26a1c2da6594681799829eb001299f50133">InstAttr_Matrix</a>,
<a name="l00011"></a><a class="code" href="_g_l_shader_manager_8h.html#aa356ed6eff83a083cec318b3f4c5ec26a1f8346e407056498481efc7213a134cc">00011</a>    <a class="code" href="_g_l_shader_manager_8h.html#aa356ed6eff83a083cec318b3f4c5ec26a1f8346e407056498481efc7213a134cc">InstAttr_Vector</a>,
<a name="l00012"></a><a class="code" href="_g_l_shader_manager_8h.html#aa356ed6eff83a083cec318b3f4c5ec26a14037311b798bd8cf06e524e5d2df0ed">00012</a>    <a class="code" href="_g_l_shader_manager_8h.html#aa356ed6eff83a083cec318b3f4c5ec26a14037311b798bd8cf06e524e5d2df0ed">InstAttr_Float</a>,
<a name="l00013"></a>00013    
<a name="l00014"></a>00014 }<a class="code" href="_g_l_shader_manager_8h.html#af7a641d7f4acf450eb21ad136c341fd6">InstanceAttribType</a>;
<a name="l00015"></a>00015 
<a name="l00016"></a>00016 <span class="keyword">struct </span><a class="code" href="struct_g_l_shader_info.html">GLShaderInfo</a>
<a name="l00017"></a>00017 {
<a name="l00018"></a><a class="code" href="struct_g_l_shader_info.html#aa0445b3972868399e3eaff0dc2286660">00018</a>    GLuint <a class="code" href="struct_g_l_shader_info.html#aa0445b3972868399e3eaff0dc2286660">mCompiledID</a>;
<a name="l00019"></a><a class="code" href="struct_g_l_shader_info.html#a0895bbd900b281d9dc27590cd562f094">00019</a>    GLenum <a class="code" href="struct_g_l_shader_info.html#a0895bbd900b281d9dc27590cd562f094">mShaderType</a>;
<a name="l00020"></a><a class="code" href="struct_g_l_shader_info.html#a2b54b11c9e4e335af5d93c9c077f1438">00020</a>    std::string <a class="code" href="struct_g_l_shader_info.html#a2b54b11c9e4e335af5d93c9c077f1438">mSourceData</a>;
<a name="l00021"></a><a class="code" href="struct_g_l_shader_info.html#ab8b3b1d00a21b43770c44d961b6f80a4">00021</a>    <a class="code" href="struct_g_l_shader_info.html#ab8b3b1d00a21b43770c44d961b6f80a4">GLShaderInfo</a>(GLuint <span class="keywordtype">id</span>, GLenum type, std::string data){
<a name="l00022"></a>00022       <a class="code" href="struct_g_l_shader_info.html#aa0445b3972868399e3eaff0dc2286660">mCompiledID</a> = id;
<a name="l00023"></a>00023       <a class="code" href="struct_g_l_shader_info.html#a0895bbd900b281d9dc27590cd562f094">mShaderType</a> = type;
<a name="l00024"></a>00024       <a class="code" href="struct_g_l_shader_info.html#a2b54b11c9e4e335af5d93c9c077f1438">mSourceData</a> = data;
<a name="l00025"></a>00025    }
<a name="l00026"></a>00026 };
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="comment">//singleton pattern</span>
<a name="l00030"></a>00030 <span class="keyword">class </span><a class="code" href="class_g_l_shader_manager.html">GLShaderManager</a>
<a name="l00031"></a>00031 {
<a name="l00032"></a>00032 <span class="keyword">public</span>:
<a name="l00033"></a>00033    <span class="keyword">static</span> <a class="code" href="class_g_l_shader_manager.html">GLShaderManager</a>* <a class="code" href="class_g_l_shader_manager.html#a309ef82d5ede4781a8f885d945731c2c">GetSingleton</a>(<span class="keywordtype">void</span>);
<a name="l00034"></a>00034 
<a name="l00035"></a>00035    <span class="keywordtype">bool</span> <a class="code" href="class_g_l_shader_manager.html#a3c950a68e759cd938358f1cd43deed51">CompileShader</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* shader_name, GLenum shader_type);
<a name="l00036"></a>00036 
<a name="l00037"></a>00037    <span class="keywordtype">bool</span> <a class="code" href="class_g_l_shader_manager.html#ad0e4b18d078297c092a2967d3a6b7b1c">CheckShaderCompile</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> shader_id, std::string&amp; error);
<a name="l00038"></a>00038    <span class="keywordtype">bool</span> <a class="code" href="class_g_l_shader_manager.html#ac3d82193f42660444add6e6ffcb9913c">CheckShaderLink</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> program_id, std::string&amp; error);
<a name="l00039"></a>00039    
<a name="l00040"></a>00040    <span class="keywordtype">bool</span> <a class="code" href="class_g_l_shader_manager.html#a453160e552f478f567e40a1458a4f9d1">LinkToProgram</a>(<span class="keywordtype">void</span>);
<a name="l00041"></a>00041 
<a name="l00042"></a>00042    <span class="keywordtype">void</span> <a class="code" href="class_g_l_shader_manager.html#acc90146ef4dfb7ced977a4fdae431a58">Run</a>(<span class="keywordtype">void</span>);
<a name="l00043"></a>00043    
<a name="l00044"></a>00044    <span class="keywordtype">bool</span> <a class="code" href="class_g_l_shader_manager.html#aff296ce82be513e582da61f74c6719ca">FillGLInstanceAttribBegin</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> buf_id);
<a name="l00045"></a>00045    <span class="comment">// need to set a inter static var to save the current offset </span>
<a name="l00046"></a>00046    <span class="keywordtype">bool</span> <a class="code" href="class_g_l_shader_manager.html#a21db7ad0745505dfc07847fa2d20a3a2">FillGLInstanceAttrib</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* attrib_name, <a class="code" href="_g_l_shader_manager_8h.html#af7a641d7f4acf450eb21ad136c341fd6">InstanceAttribType</a> type, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> attrib_stride);
<a name="l00047"></a>00047 
<a name="l00048"></a>00048    <span class="keywordtype">void</span> <a class="code" href="class_g_l_shader_manager.html#aef5f413131c87654dfba77b10570c480">FillGLInstanceAttribEnd</a>(<span class="keywordtype">void</span>);
<a name="l00049"></a>00049 
<a name="l00050"></a>00050       
<a name="l00051"></a>00051 <span class="keyword">private</span>:
<a name="l00052"></a>00052    <a class="code" href="class_g_l_shader_manager.html">GLShaderManager</a>(<span class="keywordtype">void</span>);
<a name="l00053"></a>00053    ~<a class="code" href="class_g_l_shader_manager.html">GLShaderManager</a>(<span class="keywordtype">void</span>);
<a name="l00054"></a>00054 
<a name="l00055"></a>00055 <span class="keyword">private</span>:
<a name="l00056"></a>00056    <span class="keyword">static</span> <a class="code" href="class_g_l_shader_manager.html">GLShaderManager</a>* _mSingleton;
<a name="l00057"></a>00057    std::vector&lt;GLShaderInfo&gt; _mShaderVector;
<a name="l00058"></a>00058    GLuint _mProgramID;
<a name="l00059"></a>00059    <span class="keywordtype">int</span> _mLastAttribPos;
<a name="l00060"></a>00060    
<a name="l00061"></a>00061 };
<a name="l00062"></a>00062 
<a name="l00063"></a>00063 <span class="preprocessor">#endif //GL_SHADER_MANAGER_H</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Sun Feb 5 2012 00:51:24 for atestcasefordoxy by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5
</small></address>

</body>
</html>
